<?php
namespace app\mini\controller\v1\client;

use app\common\model\CarSeries as seriesModel;
use app\mini\controller\Common;
use think\Env;
use think\Exception;

class CarSeries extends Common
{
    //车系列表
    public function series()
    {
        try{
            $brand_id = input('brand_id',0);
            if (empty($brand_id)){
                self::$http_code = 200;
                throw new Exception("品牌ID参数缺失");
            }
            $data['list'] = seriesModel::geSeriesByBrandId($brand_id);//获取指定品牌的系列
            return show(200, 'success', $data);
        }catch (Exception $e){
            return show(self::$err_code, $e->getMessage(), [], self::$http_code);
        }
    }
}